package cn.itcast.clients;

import cn.itcast.config.FeignClientConfiguration;
import cn.itcast.fallback.OrdersClientFallBackFactory;
import cn.itcast.entity.Note;
import cn.itcast.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "note-service",
        configuration = FeignClientConfiguration.class
        , fallbackFactory = OrdersClientFallBackFactory.class
)
public interface NoteClients {
    @PostMapping("/note/add")
    public Result noteAdd(@RequestBody Note note);
}
